.decorate-page {
  margin: 0 -16px;
  .page-header {
    height: auto;
    line-height: 40px;
    padding: 0;
    background: var(--sa-background-assist);
    color: var(--sa-place);
    overflow: hidden;
    border-bottom: 1px solid var(--sa-border);

    .sa-icon {
      margin-right: 10px;
      cursor: pointer;
    }

    .oper-button {
      width: 48px;
      height: 40px;
      line-height: 40px;
      text-align: center;
      border-right: 1px solid var(--sa-border);
      cursor: pointer;

      .sa-icon {
        margin-right: 0;
        color: var(--sa-subfont);
      }

      &.is-active {
        background: var(--el-color-primary);

        .sa-icon {
          color: var(--sa-background-assist);
        }
      }
    }

    .el-divider--vertical {
      height: 40px;
      margin: 0 12px 0 0;
    }

    .header-center {
      justify-content: center;
    }

    .header-right {
      .preview,
      .save {
        border: none;
        border-radius: 0;
        border-left: 1px solid var(--sa-border);

        &:hover {
          background: var(--t-bg-active);
        }
      }
    }
  }

  .page-main {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0;
    margin: 0 !important;
    position: relative;
    overflow: hidden;

    .el-scrollbar {
      z-index: 10;
      background: var(--sa-background-assist);
    }

    .collapse-icon {
      width: 24px;
      height: 84px;
      color: var(--sa-font);
      background: var(--sa-space);
      border-radius: 0 24px 24px 0;
      border: 1px solid var(--sa-space);
      box-shadow: 0 0 4px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.06),
        0 4px 8px 2px rgba(0, 0, 0, 0.04);
      position: absolute;
      top: 50%;
      margin-top: -42px;
      z-index: 1;
      cursor: pointer;
    }

    .main-center {
      height: 100%;
      flex: 1;
      padding-top: 10px;
      background: var(--sa-bg-assist-1);
      overflow-y: auto;
      position: relative;
      z-index: 0;
      #html2canvasWrap {
        position: absolute;
        top: 18px;
        width: 375px;
        min-height: calc(100% - 26px);
        background: var(--sa-background-assist);
        display: flex;
        flex-direction: column;
        &.is-android {
          border-radius: 8px;
          &::before {
            border-radius: 16px;
          }
          &::after {
            border-radius: 16px;
          }
        }
        &.is-ios {
          border-radius: 32px;
          &::before {
            border-radius: 40px;
          }
          &::after {
            border-radius: 40px;
          }
        }
        &::before {
          content: '';
          position: absolute;
          top: -8px;
          left: 50%;
          right: 0;
          bottom: -8px;
          z-index: 1;
          margin-left: -195.5px;
          width: 375px;
          height: inherit;
          border: 8px solid var(--sa-title);
          pointer-events: none;
          cursor: move;
          overflow: hidden;
        }
        &::after {
          content: '';
          position: absolute;
          top: -8px;
          left: 50%;
          right: 0;
          bottom: -8px;
          z-index: 0;
          margin-left: -203.5px;
          width: 391px;
          height: inherit;
          // background: var(--sa-bg-assist-1);
          border: 8px solid var(--sa-bg-assist-1);
          pointer-events: none;
          cursor: move;
          overflow: hidden;
        }
        .comp-wrap {
          position: relative;
          flex: 1;
          background-repeat: no-repeat !important;
          background-size: 100% !important;
          .comp-item {
            position: relative;
            .comp-name {
              position: absolute;
              top: 0;
              left: -88px;
              z-index: 1;
              width: 80px;
              height: 32px;
              background: var(--sa-background-assist);
              box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.08), 0px 2px 6px rgba(0, 0, 0, 0.06),
                0px 4px 8px 2px rgba(0, 0, 0, 0.04);
              border-radius: 2px;
              display: flex;
              align-items: center;
              justify-content: center;
              font-weight: 400;
              font-size: 14px;
              color: var(--sa-font);
            }
            .comp-tools {
              display: none;
              position: absolute;
              top: 0;
              right: -40px;
              z-index: 1;
              width: 32px;
              background: var(--sa-background-assist);
              box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.08), 0px 2px 6px rgba(0, 0, 0, 0.06),
                0px 4px 8px 2px rgba(0, 0, 0, 0.04);
              border-radius: 2px;
              // display: flex;
              flex-direction: column;
              align-items: center;
              justify-content: center;
              padding-top: 8px;
              .el-icon {
                font-size: 16px;
                margin-bottom: 8px;
              }
            }
            .comp-content {
              background-size: 100% !important;
              background-repeat: no-repeat !important;
              overflow: hidden;
              min-height: 30px;
            }
            &::before {
              content: '';
              position: absolute;
              top: 0;
              left: 0;
              right: 0;
              bottom: 0;
              border: 1px;
              height: 100%;
              z-index: 1;
              pointer-events: none;
              cursor: move;
              display: none;
            }
            &:hover {
              cursor: pointer;
              &::before {
                display: flex;
                border: 1px dashed var(--el-color-primary);
              }
            }
            &.is-active {
              &.comp-item::before {
                display: flex;
                border: 1px solid var(--el-color-primary);
              }
              .comp-name {
                color: #fff;
                background: var(--el-color-primary);
              }
              .comp-tools {
                display: flex;
              }
            }
          }
        }
        .ios-bar {
          width: 375px;
          position: absolute;
          left: 0;
          bottom: 0;
          z-index: 10;
          pointer-events: none;
        }
      }
    }
  }

  @media only screen and (max-width: 768px) {
    .page-header {
      justify-content: space-between !important;

      .header-center {
        display: none;
      }
    }

    .page-main {
      .center {
        padding-top: 0;

        .center-border {
          border-radius: 0 !important;
          border: none;
        }
      }
    }
  }

  .el-main {
    &::-webkit-scrollbar {
      display: none;
    }
  }
}
